#ifndef CONFIG_H
#define CONFIG_H

#include <unistd.h>
#include <cstdlib>
#include <cstring>
using namespace std;

class Config {
public:
	Config() {}
	~Config(){}

	void parseArg(int argc, char* argv[]) {
		int opt;
		const char* str = "s:p:d:";
		while ((opt = getopt(argc, argv, str)) != -1) {
			switch(opt) {
				case 's':
					sigma = atof(optarg);
					break;
				case 'p':
					port = atoi(optarg);
					break;
				case 'd':
					interval = atoi(optarg);
					break;
				default:
					break;
			}
		}
	}

	//二元正态分布的相关系数，默认为0
	double sigma = 0.0;

	//数据接收端口号，默认为8000
	int port = 8000;

	//数据生成间隔，单位毫秒，默认为100
	int interval = 100;
};

#endif